<template>
    <section>
        <el-card style="margin-bottom: 20px">
            <div>详情</div>
            <hr>
            <div style="margin-bottom: 5px">名称：{{PersistentVolumeClaimDetail.persistentVolumeClaim.name}}</div>
            <div style="margin-bottom: 5px">命名空间：{{PersistentVolumeClaimDetail.persistentVolumeClaim.Namespace}}</div>
            <div style="margin-bottom: 5px">状态：{{PersistentVolumeClaimDetail.persistentVolumeClaim.Status}}</div>
            <div style="margin-bottom: 5px">存储券：{{PersistentVolumeClaimDetail.persistentVolumeClaim.persistentVolume}}</div>
            <div style="margin-bottom: 5px">总量：{{PersistentVolumeClaimDetail.persistentVolumeClaim.RequestTotal}}</div>
            <div style="margin-bottom: 5px">访问模式：{{PersistentVolumeClaimDetail.persistentVolumeClaim.AccessModes}}</div>
            <div style="margin-bottom: 5px">创建日期：{{PersistentVolumeClaimDetail.persistentVolumeClaim.createdate}}</div>

        </el-card>




    </section>
</template>

<script>
    import { k8sPersistentVolumeClaimDetailData } from '../../api/api'
    export default {
        data() {
            return {
                PersistentVolumeClaimDetail: {
                    persistentVolumeClaim:{},

                },
            }
        },
        methods: {

            getK8sPersistentVolumeClaimDetailData(){
                let self = this
                let param = {name:this.$route.params.name,namespace:this.$route.query.namespace}
                k8sPersistentVolumeClaimDetailData(param).then((res) => {
                    console.log(res)
                    self.PersistentVolumeClaimDetail.persistentVolumeClaim = res.persistentVolumeClaim

                })

            },
            rowStyle({ row, rowIndex}){
                return "height:40px;"
            },
            headerStyle({ row, rowIndex}){
                return "height:20px;color:#0099FF;"
            },

        },
        mounted: function () {
            console.log(this.$route.params.name)
            console.log(this.$route.query.namespace)
            this.getK8sPersistentVolumeClaimDetailData()
        }
    }
</script>